


export function getArtistNames(arr){
    let result = []
    for(let i =0;i<arr.length;i++){
        result[i] = {}
        result[i].name = arr[i].name
        result[i].id   = arr[i].id
    } 
    return result

}

export function getSongtime(time){
    function formate(num){
        return num>=10?""+num:"0"+num
    }
    if(time){
        let playTime = time/1000                            
        return  formate(Math.floor(playTime/60)) +":"+ formate(Math.floor(playTime%60 ))                               
    }else{
        return "not know"  
    } 
}
